package itheima.com.Day14.myConntDownLatch;

import java.util.concurrent.CountDownLatch;

public class MyCountDownLatchDemo {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(3);
        Mother mother = new Mother(countDownLatch);
        mother.start();

        Chile1 chile1 = new Chile1(countDownLatch);
        chile1.setName("小白");
        chile1.start();
        Chile2 chile2 = new Chile2(countDownLatch);
        chile2.setName("小黄");
        chile2.start();
        Chile3 chile3 = new Chile3(countDownLatch);
        chile3.setName("小蓝");
        chile3.start();
    }
}
